namespace Storyteller.Framework.Input
{
	public class Keyboard
	{
		public enum Key
		{
			A = 65,
			B = 66,
			C = 67,
			D = 68,
			E = 69,
			F = 70,
			G = 71,
			H = 72,
			I = 73,
			J = 74,
			K = 75,
			L = 76,
			M = 77,
			N = 78,
			O = 79,
			P = 80,
			Q = 81,
			R = 82,
			S = 83,
			T = 84,
			U = 85,
			V = 86,
			W = 87,
			X = 88,
			Y = 89,
			Z = 90,

			Escape = 27,
			F1 = 112,
			F2 = 113,
			F3 = 114,
			F4 = 115,
			F5 = 116,
			F6 = 117,
			F7 = 118,
			F8 = 119,
			F9 = 120,
			F10 = 121,
			F11 = 122,
			F12 = 123,
			F13 = 124,
			F14 = 125,
			F15 = 126,

			Tilde = 192,
			D1 = 49,
			D2 = 50,
			D3 = 51,
			D4 = 52,
			D5 = 53,
			D6 = 54,
			D7 = 55,
			D8 = 56,
			D9 = 57,
			D0 = 48,
			Minus = 189,
			Plus = 187,
			Backspace = 8,

			Tab = 9,
			SquareBracketOpen = 219,
			SquareBracketClose = 221,
			Backslash = 220,

			CapsLock = 20,
			Semicolon = 186,
			Quotes = 222,
			Enter = 13,

			LeftShift = 160,
			Comma = 188, LessThan = 188,
			Period = 190, GreaterThan = 190,
			ForwardSlash = 192, Question = 191,
			RightShift = 161,

			LeftControl = 162,
			LeftAlt = 164,
			LeftWindows = 91,
			Space = 32,
			RightWindows = 92,
			RightAlt = 165,
			RightControl = 163,

			Home = 36,
			End = 35,
			PageUp = 33,
			PageDown = 34,
			Insert = 45,
			Delete = 46,

			Left = 37,
			Right = 39,
			Down = 40,
			Up = 38,

			NumLock = 144,

			NumPadDivide = 111,
			NumPadMultiply = 106,
			NumPadMinus = 109,
			NumPadPlus = 107,
			NumPadEnter = 13,
			NumPadDecimal = 110,

			NumPad0 = 96,
			NumPad1 = 97,
			NumPad2 = 98,
			NumPad3 = 99,
			NumPad4 = 100,
			NumPad5 = 101,
			NumPad6 = 102,
			NumPad7 = 103,
			NumPad8 = 104,
			NumPad9 = 105,
		}

		public static bool IsKeyDown(Key key)
		{
			return Game.Instance.KeyboardState.IsKeyDown((Microsoft.Xna.Framework.Input.Keys)key);
		}
	}
}
